from .helpers import find_last as find_last
from .types import ARG_END as ARG_END, ARG_LISTS as ARG_LISTS, Capture as Capture, IMRError as IMRError, LN as LN, Leaf as Leaf, Node as Node, STARS as STARS, SYMBOL as SYMBOL, TOKEN as TOKEN  # type: ignore
from typing import Any, List, Optional

log: Any

class FunctionArgument:
    name: str = ...
    value: Any = ...
    annotation: str = ...
    star: Optional[Leaf] = ...
    prefix: Optional[str] = ...
    @classmethod
    def build(cls: Any, leaf: Leaf, is_def: bool, **kwargs: Any) -> FunctionArgument: ...
    @classmethod
    def build_list(cls: Any, arguments: List[Leaf], is_def: bool) -> List[FunctionArgument]: ...
    def explode(self, is_def: bool, prefix: str = ...) -> List[LN]: ...
    @classmethod
    def explode_list(
        cls: Any, arguments: List[FunctionArgument], is_def: bool
    ) -> Optional[LN]: ...
    def __init__(
        self, name: Any, value: Any, annotation: Any, star: Any, prefix: Any
    ) -> None: ...
    def __lt__(self, other: Any) -> Any: ...
    def __le__(self, other: Any) -> Any: ...
    def __gt__(self, other: Any) -> Any: ...
    def __ge__(self, other: Any) -> Any: ...

class FunctionSpec:
    name: str
    arguments: List[FunctionArgument]
    is_def: bool
    capture: Capture
    node: Node
    @classmethod
    def build(cls: Any, node: Node, capture: Capture) -> FunctionSpec: ...
    def explode(self) -> LN: ...
    def __init__(
        self, name: Any, arguments: Any, is_def: Any, capture: Any, node: Any
    ) -> None: ...
    def __lt__(self, other: Any) -> Any: ...
    def __le__(self, other: Any) -> Any: ...
    def __gt__(self, other: Any) -> Any: ...
    def __ge__(self, other: Any) -> Any: ...
